#检查这个玩家是否位于已使用过名单
execute if data entity @s item.components."minecraft:custom_data"{player_can_reuse:false} if data entity @s item.components."minecraft:custom_data".cant_use_players if function dab:system/mystic_pedestal/if_player_isin_cant_use_players run return fail


#已被玩家触发
    #触发者
    $execute if data storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.trigger run data modify storage dab:system temp.MP.trigger_run.command set from storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.trigger
    #Main
    $execute if data storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.main_run run data modify storage dab:system temp.MP.main_run.command set from storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.main_run
    #exhaust
    $execute if data storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.exhaust run data modify storage dab:system temp.MP.exhaust.command set from storage dab:system gameContents.mp_effect[{id:"$(MPE_ID)"}].trigger_run.exhaust

#trigger
execute if data storage dab:system temp.MP.trigger_run.command as @n[tag=mystic_pedestal.interaction,type=interaction,distance=..1] on target at @s run function dab:system/mystic_pedestal/interaction_run/trigger

#main
execute if data storage dab:system temp.MP.main_run.command run function dab:system/mystic_pedestal/interaction_run/main

#若Main与标签交互者没有no_consume标签 进行使用次数处理
execute as @s[tag=!no_consume] unless entity @p[tag=no_consume,tag=interaction_player] run function dab:system/mystic_pedestal/consume_count

data remove storage dab:system temp.MP
data remove entity @n[tag=mystic_pedestal.interaction,type=interaction,distance=..1] interaction
tag @p[tag=interaction_player] remove interaction_player
tag @p[tag=no_consume] remove no_consume